feat(RevenueCatUI): evaluate state conditions in the override resolver (PWENG-57)#3661
feat(RevenueCatUI): evaluate state conditions in the override resolver (PWENG-57)#3661AlvaroBrey wants to merge 2 commits into
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5500d42. Configure here.
5500d42 to
c7fa19c
Compare
a932631 to
d4d7399
Compare
c7fa19c to
1d7720c
Compare
📸 Snapshot Test593 unchanged
🛸 Powered by Emerge Tools |
1c15d31 to
fd18a34
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alvarobrey/pweng-57-state-store #3661 +/- ##
================================================================
Coverage 80.49% 80.49%
================================================================
Files 404 404
Lines 16771 16771
Branches 2397 2397
================================================================
Hits 13500 13500
Misses 2327 2327
Partials 944 944 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fd18a34 to
abf2497
Compare
3eebd7d to
3cb75e6
Compare
92cb005 to
287498f
Compare
5827123 to
a5cf50f
Compare
287498f to
a51ae6b
Compare
7875cf2 to
447c5f0
Compare
be9d0f7 to
eeb9508
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 447c5f0. Configure here.
eeb9508 to
f733bd7
Compare
447c5f0 to
13c315c
Compare
f733bd7 to
3d98289
Compare
776f015 to
3685a78
Compare
bca6976 to
df99d4f
Compare
3685a78 to
26892a7
Compare
df99d4f to
375a5f2
Compare
26892a7 to
196d178
Compare
375a5f2 to
cb01277
Compare
196d178 to
4eab460
Compare
cb01277 to
dee70ca
Compare
4eab460 to
0a3bab0
Compare
dee70ca to
9c51ba7
Compare
0a3bab0 to
19e96e5
Compare
9c51ba7 to
e04c671
Compare
19e96e5 to
7924dc1
Compare
e04c671 to
9598d8d
Compare
7924dc1 to
68817b9
Compare
68817b9 to
e471070
Compare

Threads the store into the override resolution pipeline.
ConditionContextcarries astateReader: (String) -> JsonPrimitive?lambda;Condition.State.evaluatecalls it and checks the result with the declared operator. Because reads happen inside each component'sderivedStateOfblock, Compose tracks per-key subscriptions automatically — only components whose conditions reference the changed key re-evaluate.Note
Medium Risk
Changes which paywall partials apply at runtime when state conditions are used; logic is localized and heavily tested but directly affects presented UI.
Overview
State-based component overrides now participate in
buildPresentedPartialinstead of being ignored.ConditionContextgains astateReader: (String) -> JsonPrimitive?hook (default no-op) so override resolution can read paywall state by key; production callers are expected to wire this from the state store so Compose can subscribe per key insidederivedStateOf.ComponentOverride.Condition.Stateevaluates equals / not-equals against the reader result: string and boolean comparisons are strict; numbers use epsilon matching so integer conditions can match double-stored values. If the key is missing (reader returns null), the override never applies for either operator. Stored values take precedence over defaults when the reader implements that merge.Parameterized tests cover booleans, strings, numbers, defaults, type mismatch, and undeclared keys.
Reviewed by Cursor Bugbot for commit e471070. Bugbot is set up for automated code reviews on this repo. Configure here.